﻿using AutoMapper;
using Video.Application.Contract;
using Video.Application.Contract.UserInfos.Dtos;
using Video.Domain;
using Video.Domain.Users;

namespace Video.Application.AutoMapperProfile;

public class UserInfoAutoMapperProfile : Profile
{
    public UserInfoAutoMapperProfile()
    {
        // 使用ReverseMap，可以将两者互相映射
        CreateMap<UserInfo, UserInfoDto>().ReverseMap();

        CreateMap<UserInfoRoleView, UserInfoDto>();
        CreateMap<Role, RoleDto>();

        CreateMap<UserInfo, UserInfoRoleDto>();
        CreateMap<RegisterInput, UserInfo>();
    }



}
